Fix Issue #1902: Explicitly set CMAKE_OSX_DEPLOYMENT_TARGET to 15.0 - #1903
Fix Issue #1902: Explicitly set CMAKE_OSX_DEPLOYMENT_TARGET to 15.0#1903AustinBenoit wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request sets the minimum deployment target (CMAKE_OSX_DEPLOYMENT_TARGET) to 15.0 across iOS and tvOS build scripts, CMake configurations, and test scripts to resolve linker warnings. The reviewer suggests allowing this target to be overridden via the CMAKE_OSX_DEPLOYMENT_TARGET environment variable (defaulting to 15.0) in the build and GHA scripts to maintain flexibility for custom builds.
| mkdir -p ${buildpath}/ios_build_file/${platform}-${arch} && cd ${buildpath}/ios_build_file/${platform}-${arch} | ||
| cmake -G Xcode -DCMAKE_SYSTEM_NAME=iOS \ | ||
| ${sysroot_arg} \ | ||
| -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 \ |
There was a problem hiding this comment.
Hardcoding the deployment target to 15.0 prevents developers from overriding it for custom builds (e.g., targeting a different iOS version). Allowing it to be overridden via an environment variable provides better flexibility.
| -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 \ | |
| -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET:-15.0} \ |
| echo "generate Makefiles start" | ||
| mkdir -p ${buildpath}/tvos_build_file/${platform}-${arch} && cd ${buildpath}/tvos_build_file/${platform}-${arch} | ||
| cmake -DCMAKE_SYSTEM_NAME=tvOS \ | ||
| -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 \ |
There was a problem hiding this comment.
Hardcoding the deployment target to 15.0 prevents developers from overriding it for custom tvOS builds. Allowing it to be overridden via an environment variable provides better flexibility.
| -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 \ | |
| -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET:-15.0} \ |
| cmd.append('-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={0}'.format(archive_output_path)) | ||
| cmd.append('-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={0}'.format(archive_output_path)) | ||
| cmd.append('-DCMAKE_RUNTIME_OUTPUT_DIRECTORY={0}'.format(archive_output_path)) | ||
| cmd.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=15.0') |
There was a problem hiding this comment.
Hardcoding the deployment target to 15.0 in the GHA build script prevents custom builds from targeting different iOS/tvOS versions. Reading from the CMAKE_OSX_DEPLOYMENT_TARGET environment variable with a default of '15.0' provides a consistent way to override this across all build scripts.
| cmd.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=15.0') | |
| cmd.append('-DCMAKE_OSX_DEPLOYMENT_TARGET={0}'.format(os.environ.get('CMAKE_OSX_DEPLOYMENT_TARGET', '15.0'))) |
❌ Integration test FAILEDRequested by @AustinBenoit on commit 57359b4
Add flaky tests to go/fpl-cpp-flake-tracker |
Description
Explicitly set CMAKE_OSX_DEPLOYMENT_TARGET to 15.0 the minimum supported iOS version
Testing
Trigger integration tests plus pull down the built packages and make sure I don't get any warning.
Type of Change
Place an
xthe applicable box:Notes
Release Notessection ofrelease_build_files/readme.md.